const mongoose = require('mongoose')
const Schema = mongoose.Schema;
const category = new Schema({
  name: {
    type: String,
    required: true
  },
  parent_id: {
    type: mongoose.SchemaTypes.ObjectId,
    default: 'user'
  },
  registerTime: {
    type: Date,
    default: Date.now
  }
})
module.exports = mongoose.model('category', category)